import 'package:flutter_test/flutter_test.dart';
import 'package:media_kit_libs_ohos_audio/media_kit_libs_ohos_audio.dart';
import 'package:media_kit_libs_ohos_audio/media_kit_libs_ohos_audio_platform_interface.dart';
import 'package:media_kit_libs_ohos_audio/media_kit_libs_ohos_audio_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMediaKitLibsOhosAudioPlatform
    with MockPlatformInterfaceMixin
    implements MediaKitLibsOhosAudioPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final MediaKitLibsOhosAudioPlatform initialPlatform = MediaKitLibsOhosAudioPlatform.instance;

  test('$MethodChannelMediaKitLibsOhosAudio is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMediaKitLibsOhosAudio>());
  });

  test('getPlatformVersion', () async {
    MediaKitLibsOhosAudio mediaKitLibsOhosAudioPlugin = MediaKitLibsOhosAudio();
    MockMediaKitLibsOhosAudioPlatform fakePlatform = MockMediaKitLibsOhosAudioPlatform();
    MediaKitLibsOhosAudioPlatform.instance = fakePlatform;

    expect(await mediaKitLibsOhosAudioPlugin.getPlatformVersion(), '42');
  });
}
